<div class="layui-layout layui-layout-content">
	<div class="layui-side layui-beimi-left">
		<div class="layui-side-scroll">
		<#include "/apps/business/platform/include/left.html"/></div>
	</div>
	<div class="layui-body">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="site-h1" style="background-color:#FFFFFF;">
					在线玩家列表<#if playersList??>（${playersList.totalElements}）</#if>
				</h1>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12">
						<#if playersList?? && playersList.content??>
						<table class="layui-table" lay-skin="line">
							<thead>
								<tr>
									<th>用户名</th>
									<th>注册时间</th>
									<th>地区</th>
									<th>金币</th>
									<th>手机号码</th>
									<th>钻石</th>
									<th>在线</th>
									<th>系统</th>
									<th>浏览器</th>
									<th>有效账号</th>
									<th style="white-space:nowrap;width:1%;" nowrap="nowrap">操作</th>
								</tr>
							</thead>
							<tbody>
								<#list playersList.content as player>
								<tr>
									<td>${player.username!''}</td>
									<td>${player.createtime?string('yyyy-MM-dd HH:mm:ss')}</td>
									<td>${player.country!''}<#if player.province?? && player.province!="0">${player.province!''}</#if><#if player.city?? && player.city!="0">${player.city!''}</#if></td>
									<td>${player.goldcoins!''}</td>
									<td>${player.mobile!''}</td>
									<td>${player.diamonds!''}</td>
									<td>
										<#if player.online> 
										<i class="layui-icon" style="color:#19a55d;">&#xe618;</i> 
										</#if>
									</td>
									<td>${player.ostype!''}</td>
									<td>${player.browser!''}</td>
									<td>
										<#if player.disabled == false> 
										<i class="layui-icon" style="color:#19a55d;">&#xe618;</i> 
										</#if>
									</td>
									<td style="white-space:nowrap;width:1%;" nowrap="nowrap">
										<a href="/apps/platform/online/gameusers/edit.html?id=${player.id!''}" data-toggle="ajax" data-width="550" data-height="400" data-title="编辑用户信息"> <i class="layui-icon">&#xe642;</i>
											编辑
										</a> 
									</td>
								</tr>
								</#list>
							</tbody>
						</table>
						</#if>
					</div> 	   
				</div>
			</div>	
		</div>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12" id="page" style="text-align:center;"></div>
		</div>
	</div>
</div>
<script>
	layui.use('laypage', function(){
		  var laypage = layui.laypage;
		  laypage.render({
				elem: 'page'
				,count: <#if playersList??>${playersList.totalElements}<#else>0</#if> //总记录
				,limit: <#if playersList??>${playersList.size}<#else>0</#if> //总记录
				,curr:<#if playersList??>${playersList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/apps/platform/online/gameusers.html?p="+data.curr ;
					}
				}
		   });
		});
</script>